home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / basic / pbtool.exe / PBTOOL.DOC < prev    next >
Text File  |  1992-04-20  |  71KB  |  1,296 lines

  1.  
  2. PBTOOL.DOC               Monday, April 20, 1992 10:23 am               Page 1
  3.  
  4.  
  5.                                  PBTOOL.DOC
  6.       ╓──────────┐ ╓─────────┐ ╓──────────┐ ╓─────────┐ ╓─────────┐ ╓───┐
  7.       ║          │ ║         │ ║          │ ║         │ ║         │ ║   │
  8.       ║   ╓──┐   │ ║   ╓─┐   │ ║          │ ║         │ ║         │ ║   │
  9.       ║   ║  │   │ ║   ║ │   │ ╚═══╗   ┌──┘ ║  ╓───┐  │ ║  ╓───┐  │ ║   │
  10.       ║   ╚══╛   │ ║   ╚═╛   │     ║   │    ║  ║   │  │ ║  ║   │  │ ║   │
  11.       ║          │ ║       ┌─┘     ║   │    ║  ║   │  │ ║  ║   │  │ ║   │
  12.       ║   ┌──────┘ ║       └─┐     ║   │    ║  ║   │  │ ║  ║   │  │ ║   │
  13.       ║   │        ║   ╓──┐  │     ║   │    ║  ╚═══╛  │ ║  ╚═══╛  │ ║   │
  14.       ║   │        ║   ║  │  │     ║   │    ║         │ ║         │ ║   └────┐
  15.       ║   │        ║   ╚══╛  │     ║   │    ║         │ ║         │ ║        │
  16.       ║   │        ║         │     ║   │    ║         │ ║         │ ║        │
  17.       ╚═══╛        ╚═════════╛     ╚═══╛    ╚═════════╛ ╚═════════╛ ╚════════╛
  18.                                  version 1.02
  19.  
  20.       PowerBasic source code for beginner and intermediate level programmers.
  21.  
  22.                              A. KELLETT
  23.                              ATTN: SHAREWARE
  24.                              ROUTE ONE BOX 430B
  25.                              SUMMERVILLE, GA  30747-9801
  26.  
  27.         This manual and all other files on this disk, both source code, and
  28.         executable files, unless stated otherwise, are Copyright 1991 by A.
  29.         Kellett and may be used only as defined by the following license.
  30.  
  31.                             LICENSING INFORMATION:
  32.         The user is granted a 30 day trial period to evaluate this software.
  33.         If the user continues to use any part of this software after the
  34.         30 day period has expired, the user must complete the registration
  35.         form and send it with the required fee to the address listed on the
  36.         registration form.  The registered user may include the source code
  37.         in their own programs and distribute them as they wish but only
  38.         in an executable ( .EXE ) format.  This software is NOT PUBLIC DOMAIN
  39.         or free!  Try it out to see if you like it, and if useful then you
  40.         must register.  If there are not enough registrations to warrant my
  41.         time and energy, then I will continue to develop software for my
  42.         own use but it will NOT be distributed.  This software may be copied
  43.         and given to others as long as there is no charge, none of the
  44.         original files are altered, and ALL files are distributed (see
  45.         Filelist).  BBS operators and shareware distributors may distribute
  46.         this product as long as none of the original files are altered, all
  47.         files are distributed,  and they do not charge a fee exceeding
  48.         $15.00 U.S. -- if you have questions or comments, please write.
  49.  
  50.       ***************************** DISCLAIMER ******************************
  51.       PBTOOL  IS LICENSED  "AS-IS".  A. KELLETT  MAKES NO WARRANTIES, EITHER
  52.       EXPRESSED  OR  IMPLIED, WITH  RESPECT TO THIS  SOFTWARE, ITS  QUALITY,
  53.       PERFORMANCE,  MERCHANTABILITY,  OR FITNESS FOR  ANY PARTICULAR PURPOSE.
  54.  
  55. PBTOOL.DOC               Monday, April 20, 1992 10:23 am               Page 2
  56.  
  57.  
  58.       IN PARTICULAR, IT IS NOT GUARANTEED TO PREVENT OR DETECT DAMAGE TO YOUR
  59.       DATA OR  PROGRAMS.  IN  NO  EVENT SHALL A. KELLETT  BE  LIABLE FOR ANY
  60.       CLAIMS FOR LOST PROFITS OR  ANY  DAMAGE, INCLUDING, BUT NOT LIMITED TO,
  61.       SPECIAL,  INCIDENTAL,  CONSEQUENTIAL  OR OTHER  DAMAGE.  SOME STATES DO
  62.       NOT ALLOW THE  EXCLUSION OR  LIMITATION OF  INCIDENTAL OR CONSEQUENTIAL
  63.       DAMAGES, SO THE ABOVE  LIMITATION OR  EXCLUSION  MAY  NOT APPLY TO YOU.
  64.       IN  NO CASE SHALL A. KELLETTs'  LIABILITY  EXCEED THE LICENSE FEES PAID
  65.       FOR THE RIGHT TO USE THE  LICENSED SOFTWARE.  THE LICENSE AGREEMENT AND
  66.       WARRANTY SHALL BE  CONSTRUED, INTERPRETED  AND  GOVERNED BY THE LAWS OF
  67.       THE STATE OF GEORGIA.
  68.       ***************************** DISCLAIMER ******************************
  69.  
  70.         With that done, let me say that I have carefully tested this software
  71.         on a variety of hardware, including 8088, 80286, and 80386 equipped
  72.         PCs from several different manufacturers.  I cannot guarantee
  73.         compatability with all hardware on the market.  If you have specific
  74.         problems, please send your questions to me along with a self-
  75.         addressed, stamped envelope.
  76.  
  77.  
  78.                   T A B L E    O F    C O N T E N T S
  79.  
  80.         Introduction......................................04
  81.         Credits...........................................05
  82.         Registration information..........................05-06
  83.         Installation......................................06
  84.         File Listing......................................07-09
  85.         Individual file Descriptions
  86.            2DIR.EXE.......................................09
  87.            AREACD92.EXE...................................09
  88.            BREAK.INC......................................09
  89.            CALENDAR.EXE...................................09
  90.            CHARS.INC......................................09
  91.            CLEAR.BAS......................................10
  92.            COLORS.BAS.....................................10
  93.            COLORS.INC.....................................10
  94.            CONVERT.BAS....................................10
  95.            CONVERT2.BAS...................................10
  96.            CRT25.COM......................................10
  97.            DAYOWEEK.BAS...................................10
  98.            DAYSTWEN.BAS...................................10
  99.            DAYTER.BAS.....................................11
  100.            DBASE.TXT......................................11
  101.            EGA43.COM......................................11
  102.            FASTKYBD.BAS...................................11
  103.            FILEWIP1.BAS...................................11
  104.            FILEWIPE.BAS...................................11
  105.            FILEXIST.BAS...................................11
  106.            FREESPC.BAS....................................11
  107.  
  108. PBTOOL.DOC               Monday, April 20, 1992 10:23 am               Page 3
  109.  
  110.  
  111.            FREEMEM.BAS....................................12
  112.            GETCHAR.INC....................................12
  113.            GETDRIVE.BAS...................................12
  114.            GETKEY.BAS.....................................12
  115.            GET_KEY.BAT....................................12
  116.            GRAPHDEM.EXE...................................12
  117.            HEADER.BAS.....................................12
  118.            HOUR_MIN.COM...................................12
  119.            IAMGONE.BAS....................................12
  120.            ISLEAP.BAS.....................................13
  121.            JULIAN.BAS.....................................13
  122.            KEY.COM........................................13
  123.            KEYS.INC.......................................13
  124.            KEYWORDS.TXT...................................13
  125.            LABELS.BAS.....................................13
  126.            LITEBAR.BAS....................................13
  127.            LITEBAR2.BAS...................................13
  128.            LOWER.BAS......................................14
  129.            MENUBAR.BAS....................................14
  130.            MENUBAR2.BAS...................................14
  131.            MSGLINE.BAS....................................14
  132.            NEWS.EXE.......................................14
  133.            NUMBERS.INC....................................14
  134.            PBATTRIB.EXE...................................14
  135.            PBCOPY.BAS.....................................15
  136.            PBLIB.BAS......................................15
  137.            PBSEARCH.BAS...................................15
  138.            PBSPLIT.EXE....................................15
  139.            PBTOGGLE.BAS...................................15
  140.            PBVIEWER.BAS...................................15
  141.            PDEBUG.BAT.....................................16
  142.            PRINTDBF.BAS...................................16
  143.            PX.BAT.........................................16
  144.            RANDOM.BAS.....................................16
  145.            READDBF.BAS....................................16
  146.            READGIF.BAS....................................16
  147.            REALPROG.TXT...................................16
  148.            REDNECK.EXE....................................17
  149.            REGNAMES.INC...................................17
  150.            SCREEN.DAT.....................................17
  151.            SETDRIVE.BAS...................................17
  152.            SMSORT.BAS.....................................17
  153.            SNOW.BAS.......................................17
  154.            STARS.BAS......................................17
  155.            STRIPPER.BAS...................................17
  156.            TACHBAR.BAS....................................17
  157.            TIMER.BAS......................................17
  158.            TOUCH.EXE......................................17
  159.            TOUCHIT.BAS....................................18
  160.            TRACKER.BAS....................................18
  161.  
  162. PBTOOL.DOC               Monday, April 20, 1992 10:23 am               Page 4
  163.  
  164.  
  165.            UPPER.BAS......................................18
  166.            VALIDATE.BAS...................................18
  167.            VGA28.COM......................................18
  168.            VGA50.COM......................................18
  169.            WAIT.BAS.......................................19
  170.            YESNO.COM......................................19
  171.            YESNO2.COM.....................................19
  172.  
  173.         Notes for Beginning programmers...................19-21
  174.         Notes to TurboBasic users.........................21-22
  175.         Notes to QuickBasic users.........................22
  176.         Release/Version History...........................22-23
  177.         Addresses.........................................23-24
  178.         Personal..........................................24
  179.  
  180.  
  181.                               INTRODUCTION
  182.  
  183.         The following products are trademarks of their respective owners:
  184.  
  185.            DBASE/.DBF      --  Ashton-Tate (now Borland International)
  186.            GIF             --  GIF and Graphics Interchange Format are
  187.                                copyrighted by CompuServe
  188.            PKLITE/PKZIP    --  PKWare
  189.            PowerBasic      --  Robert Zale ( dist. by Spectra Publishing )
  190.            Qedit           --  Semware ( Sammy Mitchell ) a SUPER editor !
  191.            QuickBasic      --  Microsoft Corporation
  192.            Turbo Assembler --  Borland International
  193.            Turbo Basic     --  Borland International
  194.  
  195.  
  196.                                What is PBTOOLs?
  197.         I have used TurboBasic since 1988 and PowerBasic since its first
  198.         release.  Both are very good compilers for creating professional
  199.         quality software in the BASIC language.  Over time I found myself
  200.         using, and sometimes recreating, the same routines in a variety of
  201.         situations.  In the mainframe world, we would create a library of
  202.         routines which could easily be incorporated into any program(s)
  203.         needing that particular function.  Once the code was debugged and
  204.         placed into the library, it was treated as a "black-box" and simply
  205.         plugged into a program wherever needed.  As I wrote more and more
  206.         code, I began looking for a similar library for PowerBasic.  There
  207.         were several high quality ones for QuickBasic, but the differences
  208.         between the two versions of BASIC prevented me from trying them out.
  209.         [ Note to QuickBasic users: I am not slinging mud at QuickBasic, it
  210.         is certainly a very fine product.  I prefer PowerBasic because of
  211.         some features it has that QuickBasic either does not have or has
  212.         implemented in a way I do not like.  Also, QuickBasic has some
  213.         features I would like to see in PowerBasic. ]  Finally I began writing
  214.  
  215. PBTOOL.DOC               Monday, April 20, 1992 10:23 am               Page 5
  216.  
  217.  
  218.         and testing routines to place in my own PowerBasic "library".  The
  219.         routines must be:  1) reliable, 2) generic enough to be usable in more
  220.         than one place, and 3) clearly coded so that other programmers can
  221.         understand what is happening.  A friend saw some programs
  222.         incorporating many library features and was impressed to find it had
  223.         been written in PowerBasic ( he assumed it was written in C ).  Now
  224.         you have the results of my work, and of course I will keep updating
  225.         and adding to it as time, need, and requests pour in.
  226.  
  227.         If you have comments, gripes, or questions please write.  Registered
  228.         users will get first priority, if you enclose a self-addressed stamped
  229.         envelope you will get second priority, everyone else will get whatever
  230.         priority is left over ( remember I'm not independently wealthy so
  231.         please try the self-addressed stamped envelope first ).  DO NOT CALL!
  232.         At this time I do not have a business phone and do not plan to provide
  233.         support via a BBS.  If there are enough registered users who are
  234.         interested, BBS support would certainly be considered.  I will not
  235.         know if you like or dislike this software unless you write.
  236.  
  237.  
  238.                                    CREDITS
  239.         I have never seen any software whose design was not influenced by
  240.         more than one person (ie teachers, etc).  SPECIAL THANKS goes to
  241.         my wife and three kids who put up with my EXTRA long hours (for
  242.         several years) spent over a hot keyboard.  My wife even bought my
  243.         first computer and got me started!  To Howard H. and Mike P. for
  244.         all those strange ideas of mine you stifled and the better ones you
  245.         suggested/encouraged, you both get a GOLD STAR to show your wives.
  246.         To the rest of my family, former teachers ( J.L. and E.P.), and
  247.         coworkers over the years: who knows how in the world you put up
  248.         with me but it was lots of fun.  Extra special thanks to those
  249.         who register and write with suggestions for improvement.  I have
  250.         learned a great deal from many articles and programs written by
  251.         Ethan Winer and Bruce Tonkin -- long may their editors wave.  ALL
  252.         documentation, source code etc., was produced using QEDIT by
  253.         Sammy Mitchell -- if you want a fine editor that can be test-
  254.         driven as shareware, try QEDIT today (see addresses at end).  Of
  255.         course, without Bob Zale, I might have drifted towards some really
  256.         nerdy language (pick whichever one you think fits that description).
  257.  
  258.  
  259.                         REGISTRATION INFORMATION
  260.  
  261.                      What do you get for registering PBTOOLs?
  262.         Undying gratitude is nice, but it doesn't go very far.  If you do
  263.         register, you will get the next major release when available (be
  264.         sure to put the number of the version you've got on the registration
  265.         form when you send it to me), source code for the few files which
  266.         are distributed as .EXEs (KEY.COM is public domain, TOUCH.EXE was
  267.  
  268. PBTOOL.DOC               Monday, April 20, 1992 10:23 am               Page 6
  269.  
  270.  
  271.         written in C but I'll include the source to it), and you'll be
  272.         able to write to gripe/suggest/comment and get a reply.  Of course
  273.         registered users will be able to buy the newest version as they
  274.         come off the assembly line at greatly discounted prices.  To print
  275.         out the registration form, do one of the following at a DOS prompt:
  276.              TYPE REGISTER.TXT > PRN
  277.                    or
  278.              COPY REGISTER.TXT LPT1:
  279.         For other licensing information or for customized code, please
  280.         send a letter on your company letterhead with as many details
  281.         as possible.
  282.  
  283.         To print out this documentation file do one of the following at a
  284.         DOS prompt:
  285.              TYPE PBTOOL.DOC > PRN
  286.                    or
  287.              COPY PBTOOL.DOC LPT1:
  288.         This documentation file is spaced to provide no more than 60 lines
  289.         per page, and a minimum one-half inch left margin (great for hole
  290.         punching for binders/notebooks).
  291.  
  292.                               INSTALLATION
  293.  
  294.         If the distributor you received this disk from has any special
  295.         installation instructions, please disregard the following ones.
  296.         
  297.         PBTOOLs requires no special installation.  First you should
  298.         create a directory on your work drive:
  299.              MKDIR C:\BASIC\PBTOOL
  300.         This will create a subdirectory named PBTOOL within your BASIC
  301.         subdirectory on the C drive.  Then copy all the files from the
  302.         original disk:
  303.              COPY A:*.* C:\BASIC\PBTOOL\*.*
  304.         Substitute B: for A: if you are installing from drive B.  Be
  305.         sure to alter your PATH statement in your AUTOEXEC.BAT file
  306.         to include the new subdirectory (if you create one).  You may
  307.         wish to simply COPY all the PBTOOLs files into your regular
  308.         BASIC subdirectory:
  309.              COPY A:*.* C:\PBASIC\*.*
  310.         Be sure to BACK UP all your work first in case some of your own
  311.         files are overwritten (see File Listing to be sure the file
  312.         names are not the same as some of your own file names).  If
  313.         you have any questions about creating a directory or changing
  314.         your PATH statement, please refer to the DOS manual that
  315.         came with your computer.  After you finish installing, <PLEASE>
  316.         put your original disk in a safe place!
  317.  
  318.  
  319.  
  320. PBTOOL.DOC               Monday, April 20, 1992 10:23 am               Page 7
  321.  
  322.  
  323.                               FILE LISTING
  324.  
  325.         The following is a listing of the files included on this disk
  326.         along with a brief function summary.  See the documentation for
  327.         each individual program for more detail.
  328.  
  329.           FILE                     function
  330.         (Note: P beside the file name designates for PowerBasic only)
  331.         REGISTER.TXT  the registration form to send in
  332.         PBTOOL.DOC    documentation file, you're reading it here...
  333.         README.1ST    latest news not in PBTOOL.DOC (included if needed)
  334.  
  335.         CLEAR.BAS     clears the screen from:  left to right, right to left
  336.                                                top to bottom, bottom to top,
  337.                                                middle to top and bottom,
  338.                                                top and bottom to middle,
  339.                                                outside (sides) to middle,
  340.                                                middle to outside (sides)
  341.         COLORS.BAS    displays colors and values needed in COLOR statement
  342.         CONVERT.BAS   convert a single character within a file to another char
  343.         CONVERT2.BAS  capitalize first letter of each word within a file
  344.         DAYOWEEK.BAS  find day of the week using Zeller's Congruence
  345.         DAYSTWEN.BAS  days between two dates
  346.         DAYTER.BAS    display day, date, and time in normal format
  347.         FASTKYBD.BAS  outputs a .COM file, fast keyboard rate for ATs & PS/2s
  348.         FILEXIST.BAS  test whether a file currently exists or not
  349.         FILEWIP1.BAS  wipe a file by overwriting - better for security
  350.         FILEWIPE.BAS     "         "      "      - much faster
  351.       P FREESPC.BAS   amount of free disk space available
  352.         FREEMEM.BAS   amount of free memory available
  353.         GETDRIVE.BAS  gets the drive currently used
  354.       P GETKEY.BAS    allows entering keys in a .BAT file
  355.         HEADER.BAS    header to include at top of all your source code
  356.         IAMGONE.BAS   displays message on screen while you're not in
  357.         ISLEAP.BAS    tests for leap years
  358.         JULIAN.BAS    converts MM-DD-YY format into YY and DDD format
  359.         LABELS.BAS    prints on 15/16" X 3.5" labels
  360.         LITEBAR.BAS   user friendly pick-a-choice menu
  361.         LOWER.BAS     converts a text file to all lowercase
  362.         MENUBAR.BAS   user friendly top-of-screen menu bar
  363.         MENUBAR2.BAS  user friendly top-of-screen menu bar w/explanatory line
  364.         MSGLINE.BAS   ticker-tape scrolling message line
  365.         PBCOPY.BAS    file copying program
  366.         PBLIB.BAS     simple, effective (small) routines to plug in
  367.         PBSEARCH.BAS  search file for specified characters
  368.       P PBTOGGLE.BAS  toggles status of "locking" keys: caps/num/scroll
  369.         PBVIEWER.BAS  view contents of any file
  370.         PRINTDBF.BAS  print file structure of DBASE .DBF file
  371.         RANDOM.BAS    generates a sequence of pseudo-random numbers
  372.         READDBF.BAS   display file structure of DBASE .DBF file
  373.  
  374. PBTOOL.DOC               Monday, April 20, 1992 10:23 am               Page 8
  375.  
  376.  
  377.         SETDRIVE.BAS  changes current drive to user specified drive
  378.         SMSORT.BAS    Shell Metzner sort, very useful in TurboBasic
  379.         SNOW.BAS      displays "SNOW", prevents screen burn in
  380.         STARS.BAS     simple graphics and not-so-subtle advertisement
  381.         STRIPPER.BAS  strips specified characters from file, writes new file
  382.         TACHBAR.BAS   display progressive "tachometer" bar - keep user informed
  383.         TIMER.BAS     displays the time until a key is pressed
  384.       P TOUCHIT.BAS   set file time/date stamp to current time/date
  385.         TRACKER.BAS   tracks date/time of boots, use in AUTOEXEC file
  386.         UPPER.BAS     converts a text file to all uppercase
  387.         VALIDATE.BAS  checks validity of dates
  388.         WAIT.BAS      timed pause, use from DOS ( ie .BAT files )
  389.  
  390.                              Include files
  391.         BREAK.INC     break out of most programs in loops
  392.         CHARS.INC     valid characters, use with GETCHAR.BAS for demo
  393.         COLORS.INC    names of colors, use instead of numbers
  394.         GETCHAR.INC   filtered input, protects entry from unwanted characters
  395.         KEYS.INC      defines extended keypresses for user input
  396.         NUMBERS.INC   types of numeric variables and valid ranges
  397.         REGNAMES.INC  named registers, use for assembler routines
  398.  
  399.                            Compiled programs
  400.       P 2DIR.EXE      displays 2 directories side-by-side (great for compares!)
  401.         AREACD92.EXE  scrolling search for area codes by state or number
  402.         CALENDAR.EXE  displays a monthly calendar from 1801 - 1999
  403.         GRAPHDEM.EXE  slightly random geometric screen drawing program
  404.         NEWS.EXE      latest Galactic Headlines, funny for AUTOEXEC.BAT
  405.       P PBATTRIB.EXE  modify file attributes
  406.         PBSPLIT.EXE   split large files into manageable chunks
  407.         READGIF.EXE   displays information on .GIF picture files
  408.         REDNECK.EXE   Redneck aptitude test, become a grits eater
  409.            Please Note: these .EXE files are compressed using PKLite from
  410.            PKWare (see addresses at end).  This creates smaller .EXE files
  411.            which load faster and offer some security from disassembly also.
  412.            I use it mainly to save disk space so everything will fit on
  413.            a single 360k floppy - highly recommended that you try this
  414.            shareware star!
  415.  
  416.                             Useful utilities
  417.         CRT25.COM     set EGA/VGA to 25 line mode
  418.         DBASE.TXT     file layout for DBASE .DBF files
  419.         EGA43.COM     set EGA to 43 line mode
  420.         GET_KEY.BAT   demo for GETKEY.BAS - enter choices within .BAT files
  421.         HOUR_MIN.COM  displays the current time on the screen
  422.         KEY.COM       used to capture keystrokes within PDEBUG.BAT and PX.BAT
  423.         KEYWORDS.TXT  lists all TurboBasic and PowerBasic commands
  424.       P PDEBUG.BAT    use to find the source line with a run-time error
  425.  
  426. PBTOOL.DOC               Monday, April 20, 1992 10:23 am               Page 9
  427.  
  428.  
  429.       P PX.BAT        use to compile options with command-line version (PBC)
  430.         REALPROG.TXT  humorous text file on "Real Programmers"
  431.         SCREEN.DAT    screen to be used with PX.BAT
  432.         TOUCH.EXE     used to set the time/date stamp of a file to either
  433.                       the system time/date, or whatever you choose.
  434.         YESNO.COM     allows entry of Y or N and sets the errorlevel w/echo
  435.         YESNO2.COM    allows entry of Y or N and sets the errorlevel w/o echo
  436.         VGA28.COM     set VGA to 28 line mode (my personal favorite)
  437.         VGA50.COM     set VGA to 50 line mode (how large is your monitor?)
  438.  
  439.         PLEASE NOTE: all the .COM programs I have written include a line
  440.            of text within the .COM file explaining what they do.  You
  441.            can use   TYPE YESNO.COM  to see what is does.  It is very
  442.            helpful for small utilities to be somewhat "self documenting".
  443.  
  444.  
  445.                         INDIVIDUAL FILE DESCRIPTIONS
  446.  
  447.                                 2DIR.EXE
  448.         This program displays 2 directories side by side allowing up/down
  449.         scrolling to compare the files.  When entering the path for the
  450.         left and right directories, the user must enter the drive name
  451.         and the full path.  C:\LOTUS\WKS is acceptible but C:\DOS\APPS\*.*
  452.         is NOT.  This program currently does not contain extensive error
  453.         checking.  The source code is supplied to registrants and requires
  454.         PowerBasic v2.10a or greater.
  455.  
  456.                               AREACD92.EXE
  457.         Displays a scrolling list of state names and the area codes for
  458.         that state.  The user can toggle sorting the list either
  459.         alphabetically by state name or numerically by area code.
  460.  
  461.                                BREAK.INC
  462.         Allows breaking out of most programs in an endless loop.  See
  463.         further notes within the source code.
  464.  
  465.                               CALENDAR.EXE
  466.         Displays a monthly calendar from 1801 - 1999.  Correctly calculates
  467.         leap years (see ISLEAP.BAS for details).  Great for planning farther
  468.         ahead than your desk calendar or to find out what day someone was
  469.         born on.  Source code sent to registrants.
  470.  
  471.                                CHARS.INC
  472.         Contains valid characters used by the GETCHAR.BAS demo.  Used for
  473.         filtered input (including and/or excluding characters from the
  474.         user input).  Can be used to help "bullet-proof" your code so
  475.         user mistakes won't crash or corrupt your program.  Also see
  476.         GETCHAR.INC for further notes and usage.
  477.  
  478.  
  479. PBTOOL.DOC              Monday, April 20, 1992 10:23 am              Page 10
  480.  
  481.  
  482.                                CLEAR.BAS
  483.         Clears the screen from: left to right, right to left, top to bottom,
  484.         bottom to top, middle to top & bottom, top & bottom to middle,
  485.         outside to middle (sides), middle to outside (sides).  Each of the
  486.         above screen clearing routines are demonstrated by filling the
  487.         screen with a single letter, then clearing the screen.  Can liven
  488.         up the user interface
  489.  
  490.                                COLORS.BAS
  491.         Displays 15 foreground and background color combinations and the
  492.         values needed for the COLOR statement.  Useful for color monitor
  493.         programmers and indispensable for programs which MAY be used on
  494.         monochrome/paper white monitors (ie like the one I use for
  495.         development at home, unlike the VGA color monitor I have at work).
  496.  
  497.                                COLORS.INC
  498.         Allows using the names of colors instead of numbers.  Isn't
  499.         COLOR GREEN%, BLUE%   much easier to understand than
  500.         COLOR 2,1   when trying to debug or modify your code?
  501.  
  502.                               CONVERT.BAS
  503.         Allows conversion of a single character within a file to another
  504.         character (outputs to a new user-specified file).  For example,
  505.         you could use it to convert all TABs in a file into a space.
  506.         Now works on "chunks" of data - much faster for even large files.
  507.  
  508.                               CONVERT2.BAS
  509.         Converts a ASCII text file into upper/lowercase with the first
  510.         letter of each word capitalized.  Now works on "chunks" of data
  511.         at a time - much faster for even larger files.
  512.  
  513.                                CRT25.COM
  514.         Sets EGA/VGA video systems to standard 25 lines per screen. Use
  515.         in conjunction with VGA28.COM, EGA43.COM, and VGA50.COM programs.
  516.         Turbo Assembler source provided to registrants.
  517.  
  518.                                 DAYOWEEK
  519.         This program returns the day-name of the week given the date.
  520.         The idea from this code came from an old Commodore 64 BASIC
  521.         program many years ago (I never look a gift horse in the mouth).
  522.         A recent article in Dr. Dobb's Journal (Feb. 1991 p.148-149)
  523.         by Al Stevens caused me to give it a closer look.  His article
  524.         is the first I've seen that lead me to actually understand it.
  525.  
  526.                               DAYSTWEN.BAS
  527.         Gives the number of days between two user supplied dates.  The
  528.         two dates must be valid.  Students in one of my advanced COBOL
  529.         classes had real trouble with this problem, so I simply coded
  530.         it in PowerBasic as an illustration.  Commonly used in many
  531.         business applications.
  532.  
  533. PBTOOL.DOC              Monday, April 20, 1992 10:23 am               Page 11
  534.  
  535.  
  536.                                DAYTER.BAS
  537.         Displays the day, date, and time from the system clock.  I use
  538.         this in my AUTOEXEC.BAT to be sure my clock is working correctly.
  539.  
  540.                                DBASE.TXT
  541.         This text file gives detail information on the file layout of
  542.         DBASE .DBF database files.  This information could be used to
  543.         create your own programs which can access or store information
  544.         in .DBF formatted files.  See also READDBF and PRINTDBF.
  545.  
  546.                                EGA43.COM
  547.         Sets EGA video systems to 43 line mode.  Use CRT25 to reset it for
  548.         25 line mode (or use MODE CO80 at the DOS prompt).  Do not try this
  549.         on non-EGA systems.  Turbo Assembler source code will be supplied
  550.         to registrants.
  551.  
  552.                               FASTKYBD.BAS
  553.         Originally wrote the small .COM file in Turbo Assembler.  Combined
  554.         that with the basic function of those .COM writing Basic programs
  555.         which used to be so popular in PC Magazine (my code is nothing like
  556.         theirs, however).  Produces a .COM file which will set the keyboard
  557.         delay and repeat rates for ATs and PS/2s or compatibles.  Will NOT
  558.         work on 8088/8086 machines.  Not memory resident.
  559.  
  560.                               FILEXIST.BAS
  561.         Tests whether a user specified file currently exists or not.  Code
  562.         is given for both TurboBasic and PowerBasic v2.10a.  The Turbo code
  563.         will fail if the file exists with a legth of 0, or will bomb with
  564.         an error if the disk is write protected.  This same code is used
  565.         throughout many other PBTOOL programs.
  566.  
  567.                               FILEWIP1.BAS
  568.         Wipes a file by overwriting.  Basic idea came from some of Norton's
  569.         programs.  Program illustrates the power of BINARY mode (which I
  570.         find very few people using with Basic - their loss) for putting
  571.         bytes anywhere in a file they are needed.  If you have very high
  572.         security needs, this is not recommended.
  573.  
  574.                               FILEWIPE.BAS
  575.         Big brother to FILEWIP1.BAS, this one works in larger chunks of
  576.         bytes.  MANY times faster and preferred.
  577.  
  578.                               FREESPC.BAS
  579.         Returns the number of available space on a specified disk(ette)
  580.         in bytes.  Useful for any program writing to a disk file which
  581.         may take up all available room (re: ANY program outputting to disk).
  582.  
  583.  
  584. PBTOOL.DOC              Monday, April 20, 1992 10:23 am               Page 12
  585.  
  586.  
  587.                               FREEMEM.BAS
  588.         Reports the amount of free memory available.  This comes in very
  589.         handy for testing when creating tables/arrays over 64K in size.
  590.  
  591.                               GETCHAR.INC
  592.         Include file which allows entry ONLY of specified characters
  593.         including backspace, screen location, number of characters to
  594.         accept, etc.  See CHARS.INC for notes and GETCHAR.BAS for a
  595.         demo.
  596.  
  597.                               GETDRIVE.BAS
  598.         Returns the current disk drive being used.  Good for programs
  599.         building a PATH to output a file or displaying the drive letter
  600.         for the user.
  601.  
  602.                                GETKEY.BAS
  603.         Allows entering keys from within a .BAT file and sets the
  604.         errorlevel to correspond with the key that was pressed.
  605.         See GET_KEY.BAT for an example.  Used almost identically
  606.         to the public domain KEY.COM program included.  For
  607.         PowerBasic only (included is both source and .EXE file)
  608.  
  609.                               GET_KEY.BAT
  610.         This .BAT file demonstrates how to use the GETKEY.BAS program.
  611.         Compile GETKEY.BAS first then run this batch file.
  612.  
  613.                                GRAPHDEM.EXE
  614.         Graphics demo, draws slightly different screens in every
  615.         cycle.  Should run on any CGA/EGA/VGA video system.
  616.         Pressing any key while running will exit.  PowerBasic
  617.         source supplied to registrants - can be easily used for
  618.         store demos or in the lobby of a business.
  619.  
  620.                                HEADER.BAS
  621.         Insert this at the top of your own programs for internal
  622.         documentation purposes.  If your editor has an insert-block
  623.         mode, use it on this.  Of course, put your own name/compiler
  624.         instead of mine in it and save it to disk.
  625.  
  626.                               HOUR_MIN.COM
  627.         Displays the current time on the screen (and less than 1500
  628.         bytes to boot).  Good for your AUTOEXEC.BAT so you can be
  629.         sure the clock is accurate, or compile DAYTER.BAS for the
  630.         time, date, and day of the week with BASIC source code.
  631.         The Turbo Assembler source code is provided to registrants.
  632.  
  633.                               IAMGONE.BAS
  634.         Displays a message on the screen while you are out of the
  635.         office.  Pressing any key exits the program.  The user
  636.         is prompted to enter an appropriate message.
  637.  
  638. PBTOOL.DOC              Monday, April 20, 1992 10:23 am               Page 13
  639.  
  640.  
  641.                                ISLEAP.BAS
  642.         Tests a given four digit year to see if it is a leap year.
  643.         If your program allows users to input a date, or you want
  644.         to write a calendar program, this is a must.  Logic for
  645.         the test came from a long, dry passage in an ancient
  646.         ANSI COBOL book.
  647.  
  648.                                JULIAN.BAS
  649.         Converts standard MMDDYY format date into a Julianized date
  650.         (YYDDD format).  Once it is converted, calculated the number
  651.         of days between dates is simple.  You might prefer to keep
  652.         dates in your programs stored in this internal format
  653.         (maybe using four digit years - YYYYDDD).
  654.  
  655.                                 KEY.COM
  656.         KEY.COM is a public domain program - you can do what you want
  657.         with it concerning usage or distribution.  Use it within .BAT
  658.         files to branch based on user keypresses - see PX.BAT for a
  659.         sample.  Also see GETKEY.BAS for a very similar program.
  660.  
  661.                                 KEYS.INC
  662.         Allows using named keypresses (such as F1$, PGDOWN$) within
  663.         your programs making coding and debugging easier.
  664.  
  665.                               KEYWORDS.TXT
  666.         Lists all TurboBasic and PowerBasic statements, functions,
  667.         and metastatements by version.  Useful for converting programs
  668.         from one to the other or for writing your own PowerBasic
  669.         equivalents to use with TurboBasic.
  670.  
  671.                                LABELS.BAS
  672.         Problem: someone needed to print several hundred return
  673.         address labels and the expensive customer addressing system
  674.         they had would not handle it.  The quick-and-dirty version
  675.         of this program was churning out their labels in less than
  676.         thirty minutes!  This program can be easily modified to
  677.         handle other label sizes.  HINT: when testing, print on
  678.         plain paper and hold your labels next to that to check
  679.         alignment (most labels aren't cheap).
  680.  
  681.                               LITEBAR.BAS
  682.         Allows user-friendly menu with pick-a-choice by either selecting
  683.         the identifying letter or scrolling a highlight bar up and down
  684.         the menu.  Includes example code to get you started.
  685.  
  686.                               LITEBAR2.BAS
  687.         Another user-friendly litebar menu with colored bar instead of
  688.         reverse video bar.
  689.  
  690. PBTOOL.DOC              Monday, April 20, 1992 10:23 am               Page 14
  691.  
  692.  
  693.                                LOWER.BAS
  694.         Converts a text file to all lowercase.  Reads and writes bytes
  695.         in "buffers" up to 32,000 bytes at a time.  Much faster than
  696.         single-byte reads/writes.  Also see UPPER.BAS for opposite
  697.         type code (only one line of code changed!).
  698.  
  699.                               MENUBAR.BAS
  700.         A user-friendly across-the-screen menu bar.  Can be easily
  701.         positioned to any other line (ie bottom line is good too).
  702.         Select choice by using either left/right arrow key or
  703.         entering the identifying number.  Includes example code to
  704.         get you started.
  705.  
  706.                               MENUBAR2.BAS
  707.         Another user-friendly across-the-screen menu bar with an
  708.         explanatory line  below the menu bar.  Similar to what some
  709.         of the big spreadsheet companies use (but don't accuse me of
  710.         that look-and-feel nonsense, please).  Includes example code
  711.         to get you started.
  712.  
  713.                               MSGLINE.BAS
  714.         Displays a scrolling message across the screen.  Good for a
  715.         message when you're out of the office or as an advertising
  716.         aid in stores.
  717.  
  718.                                 NEWS.EXE
  719.         Display top headlines from the Galactic Inquisitor, especially
  720.         useful for the AUTOEXEC.BAT file.  Source supplied to registrants
  721.         and you can easily change it to suit yourself.  Once had a similar
  722.         program written in COMAL (yes, it's spelled correctly) for my
  723.         old Commodore.  Great language, but interpreted and only left
  724.         about 12K of memory free -- and this on a 64K machine!  The
  725.         randomizer routine should prove very useful for any games of
  726.         chance.  Source code goes straight to all registrants.
  727.  
  728.                               NUMBERS.INC
  729.         Lists type of numeric variables available in both TurboBasic
  730.         and PowerBasic.  TurboBasic supplies almost any you will need
  731.         but the 64 bit precision does come in handy sometimes.
  732.  
  733.                               PBATTRIB.EXE
  734.         Easiest way I've seen to display or change a files attributes.
  735.         Beats loading up my super-duper utility software and you don't
  736.         have to remember the switches for the DOS version.  Wished I
  737.         had written this years before.  PowerBasic v2.10a (or greater)
  738.         source is supplied to registrants.
  739.  
  740.  
  741. PBTOOL.DOC              Monday, April 20, 1992 10:23 am               Page 15
  742.  
  743.                                PBCOPY.BAS
  744.         Simple file copy program.  Could be included in your own
  745.         installation software.  Roughly 30% slower than the one that
  746.         comes with DOS.  You could also "filter" the bytes as they
  747.         stream through your program.
  748.  
  749.                                PBLIB.BAS
  750.         A library of short routines you may find useful within your
  751.         own programs.  Use Cut/Paste functions of your editor to
  752.         pull into your own programs as needed.  Simple and effective.
  753.  
  754.                               PBSEARCH.BAS
  755.         Searches a specified file for the FIRST occurence of the
  756.         user specified characters.
  757.  
  758.                               PBSPLIT.EXE
  759.         Splits large files into manageable chunks.  Want to put a 2MB
  760.         file on 360K floppies - this will do it.  To recombine type:
  761.              COPY /B FILE001 + FILE002 + FILE003 BIGFILE.XXX
  762.         FILE001 thru FILE003 are the split files and BIGFILE.XXX is
  763.         the recombined file.  Thought up the original idea some time
  764.         ago (and REALLY needed it) but tried using a public domain
  765.         version.  It was unreliable so I said,"Heck, let's throw a
  766.         good compiler and too much spare time on the problem."
  767.         The PowerBasic source is gladly supplied to registrants.
  768.         Code is not really that complicated, you can alter for greater
  769.         performance or whatever you need.
  770.  
  771.                               PBTOGGLE.BAS
  772.         Toggles the "locking" keys (ie Caps Lock, Num Lock, Scroll Lock).
  773.         Very useful in a AUTOEXEC.BAT file.  Changes the status of the
  774.         specified key to its alternative status: if caps lock is on then
  775.         it will set the caps lock key off.  Some clones will not update
  776.         the status lights on the keyboard EVEN when the actual status
  777.         changes - this means those tiny lights may be out of sync with
  778.         reality.  Some examples:
  779.                 PBTOGGLE CS   toggles Caps Lock and Scroll Lock
  780.                 PBTOGGLE N    toggles only the Num Lock
  781.                 PBTOGGLE NCS  toggles status of all three keys
  782.         Except for code to read command-line, can be modified to work
  783.         with TurboBasic (ie hard code the status to be changed).
  784.  
  785.                               PBVIEWER.BAS
  786.         Allows viewing the contents of a file.  Nothing as comprehensive
  787.         as LIST (Vernon Buerg) but rough version helped me debug a
  788.         mainframe-to-PC file transfer in a much shorter time frame.
  789.         Another good demonstration on the extraordinary values of the
  790.         BINARY file mode.
  791.  
  792.  
  793. PBTOOL.DOC              Monday, April 20, 1992 10:23 am               Page 16
  794.  
  795.  
  796.                                PDEBUG.BAT
  797.         A simple .BAT file to automate finding bugs when you receive
  798.         an error/program counter message when running a PowerBasic
  799.         compiled program.  Use   PDEBUG 1234 MYPROG.BAS   where the
  800.         source file name is MYPROG.BAS and 1234 is the program
  801.         counter the error was reported at.  Change to suit yourself
  802.         if you'd like.
  803.  
  804.                               PRINTDBF.BAS
  805.         Reads and prints the structure of a DBASE .DBF database file.
  806.         Really handy for anyone who designs and modifies DBASE files
  807.         on a regular basis.
  808.  
  809.                                  PX.BAT
  810.         A simple .BAT file to automate some options when compiling
  811.         with PBC, the PowerBasic command-line compiler.  Uses KEY.COM
  812.         to capture user keypresses and provide branching capabilities
  813.         via ERRORLEVEL.  You can easily add more options or change
  814.         the ones I have provided.  It saves me from remembering those
  815.         darned switches and helps speed up the edit/compile cycle.
  816.         The menu screen itself is SCREEN.DAT and is displayed by
  817.         the .BAT file with a simple TYPE command.  If you add other
  818.         options, you will want to add to or change SCREEN.DAT to
  819.         reflect those changes.
  820.  
  821.                                RANDOM.BAS
  822.         Generates a sequence of pseudo-random numbers.  I will leave it
  823.         to the Computer Science majors to calculate the actual randomness
  824.         it offers.
  825.  
  826.                               READGIF.EXE
  827.         Will read and display information on .GIF picture files on the A:,
  828.         B:, or the current default drive.  Displays file name, size (both
  829.         bytes and resolution), and number of colors used.  Example:
  830.            ALBERT.GIF  17,536  320x200x32
  831.         Source code gladly sent to registrants.
  832.  
  833.                               READDBF.BAS
  834.         Reads and displays information from a DBASE .DBF file.  Very useful
  835.         for anyone who works with DBASE formatted database files.
  836.  
  837.                               REALPROG.TXT
  838.         All about "Real Programmers", this text file was taken from
  839.         my memory and others.  Original source was (I think) a UNIVAC
  840.         mainframe text file - several friends saw it too and helped
  841.         me recollect it.  Also a tribute to the best darned System
  842.         Programmer (and a very good instructor) I've met.  To print
  843.         a hardcopy (at the DOS prompt) type:
  844.            TYPE REALPROG.TXT > PRN  or
  845.            COPY REALPROG.TXT LPT1:
  846.  
  847.  
  848. PBTOOL.DOC              Monday, April 20, 1992 10:23 am               Page 17
  849.  
  850.  
  851.                               REDNECK.EXE
  852.         If you ever wanted to test your abilities as a redneck, here it
  853.         the measuring tool.  Very popular at the office and on a BBS.
  854.         Don't get offended at your score or some of the questions.
  855.         The Beta test involved lots of pickup truck drivers and BBQ
  856.         eaters.  Source gladly sent to registrants.
  857.  
  858.                               REGNAMES.INC
  859.         Allows using register names instead of numbers.  Similar code was
  860.         given in the TurboBasic manual, PC Magazine, and several other
  861.         sources.  Same benefits as COLORS.INC.
  862.  
  863.                               SETDRIVE.BAS
  864.         Changes the current drive to a user specified one.  Useful
  865.         for a wide variety of applications.
  866.  
  867.                                SMSORT.BAS
  868.         Shell-Metzner sort demo, especially useful for TurboBasic users.
  869.         For data in nearly sorted order, is reputed to be faster than
  870.         the QuickSort algorithm.  Adapted from an old 8-bit, interpreted
  871.         Basic version while I was first learning TurboBasic.
  872.  
  873.                                 SNOW.BAS
  874.         If you need a simple screen blanker and aren't running that
  875.         Microsoft pseudo-operating system, this may be the ticket.
  876.         Besides, we don't get much of the real snow in the South.
  877.         Doesn't look good on sub 10MHz machines.
  878.  
  879.                                STARS.BAS
  880.         Simple display of "stars" against an advertising foreground.
  881.         An example of text mode graphics, random positioning (using
  882.         an array) and color cycling.  Try modifying to make the
  883.         sky look more realistic.  Potentially a good screen blanker.
  884.  
  885.                               STRIPPER.BAS
  886.         Strips specified characters out of a file, writing a new
  887.         output file.  Especially useful for stripping out ASCII
  888.         values over 128 to make plain vanilla text files.
  889.  
  890.                               TACHBAR.BAS
  891.         Displays a progressive "tachometer" bar.  Easily incorporated
  892.         into your programs to keep the user informed that something is
  893.         actually happening and when it should probably be finished.
  894.  
  895.                                TOUCH.EXE
  896.         Alters the time and date stamp of the user specified file.
  897.         You can supply the file name on the command-line (ie
  898.         TOUCH MYFILE.BAS) and MYFILE.BAS will have its time/date
  899.         stamp set to the current time and date as reported by
  900.         the PC clock.  Or you can simply type TOUCH and it
  901.  
  902. PBTOOL.DOC              Monday, April 20, 1992 10:23 am               Page 18
  903.  
  904.  
  905.         will prompt you for the file name, the date, and the
  906.         time you want to set for that file.  If any of the
  907.         parameters are NOT within a valid range (ie month = 13)
  908.         it will not alter the time/date stamp of that file.
  909.         There are NO extensive error checks on user input -- use
  910.         this myself and hope it will be useful to you.  The
  911.         PowerC source code is supplied to registrants, and there
  912.         <may> be a PowerBasic version somewhere in the future.
  913.  
  914.                               TOUCHIT.BAS
  915.         Alters the time and date stamp of the user specified file to
  916.         the current time and date as reported by the system clock.
  917.  
  918.                                TIMER.BAS
  919.         Displays time at random locations on the screen until a
  920.         key is pressed.  Great for limiting phone calls or as an
  921.         alternative screen blanker to SNOW.BAS.
  922.  
  923.                               TRACKER.BAS
  924.         Saves the current time/date in a file on disk.  Put in the
  925.         AUTOEXEC.BAT file to track when the computer has been rebooted.
  926.         Simple but effective way to track reboots, anyone very familiar
  927.         with the AUTOEXEC.BAT file can get around this.
  928.  
  929.                                 UPPER.BAS
  930.         Converts a text file to all uppercase.  Reads and writes bytes
  931.         in "buffers" up to 32,000 bytes at a time.  Much faster than
  932.         single-byte reads/writes.  Also see LOWER.BAS for opposite
  933.         type code (only one line of code changed!).
  934.  
  935.                               VALIDATE.BAS
  936.         Checks the validity of a user specified date.  Combine with
  937.         ISLEAP.BAS to simplify checking of user entered dates.
  938.  
  939.                                 VGA28.COM
  940.         Sets VGA video systems to 28 line mode (my favorite).  Use
  941.         CRT25 to return to 25 line mode (or MODE CO80 at the DOS
  942.         prompt).  Do not use on non-VGA systems, no error checks!
  943.         Turbo Assembler source code will be provided to registrants.
  944.  
  945.                                VGA50.COM
  946.         Sets VGA video systems to 50 line mode (and it's tiny, too).
  947.         Use CRT25 to reset to 25 line mode (or MODE CO80 at the DOS
  948.         prompt).  Do not use on non-VGA systems, no error checks!
  949.         Turbo Assembler source code will be provided to registrants.
  950.  
  951.  
  952. PBTOOL.DOC              Monday, April 20, 1992 10:23 am               Page 19
  953.  
  954.  
  955.                                 WAIT.BAS
  956.         A timed pause and demonstrates simple command-line parameters.
  957.         I use it in my AUTOEXEC.BAT just after my anti-virus software.
  958.         The Virus/No-Virus results are displayed during the boot and
  959.         this program pauses just long enough so I can read the good or
  960.         bad news.
  961.  
  962.                           YESNO.COM/YESNO2.COM
  963.         Both of these .COM programs wait for the user to press either
  964.         Y, y, N, or n and returns an errorlevel to DOS of 1 for Y or
  965.         0 for N.  Use within a .BAT file for easy branching such as:
  966.            echo *** Please press Y for yes or N for no ***
  967.            YESNO.COM
  968.            if errorlevel 1 goto yes
  969.            if errorlevel 0 goto no
  970.            :yes
  971.            echo You answered yes
  972.            goto quit
  973.            :no
  974.            echo You answered no
  975.            :quit
  976.            echo The End
  977.         YESNO.COM displays the key that the user pressed while
  978.         YESNO2.COM does not echo the user key press.  The user must
  979.         press one of the four valid keys to exit the program.  Registrants
  980.         receive the Turbo Assembler source code to both these.
  981.  
  982.  
  983.                     NOTES FOR BEGINNING PROGRAMMERS
  984.         Modern BASIC compilers have enough features to write industrial-
  985.         strength programs with almost all the benefits of "professional
  986.         languages" such as C and they are often easier to write and debug.
  987.         The C language certainly has its place -- most commercial software
  988.         on the market today is written in C with a little Assembler for
  989.         speed where absolutely necessary.  [Andy's rule of computer language
  990.         bigotry: No language has the best of everything!]
  991.  
  992.         There is not enough room here for a complete tutorial on how to
  993.         program in BASIC.  One of the best books I've seen and used (for
  994.         teaching Beginning/Intermediate BASIC) is "BASIC A Structured
  995.         Approach" by Clark and Drum (2nd Edition, South-Western Publishing
  996.         Company).  There are also some good ones specific to TurboBasic, look
  997.         around before you buy and remember that the manuals that come with
  998.         TurboBasic and PowerBasic are a good place  to start.
  999.  
  1000.         There are some points I feel are important when writing your
  1001.         code, mainly because these help you write BETTER code (easier to
  1002.         debug, maintain, modify, etc).
  1003.           1. Always use variable names long enough to look like what they
  1004.              stand for.  I use I, J, K for simple loops - usually integers
  1005.              because the loop runs faster.  I can understand what TABLE.SIZE&
  1006.              means during the heat of a debugging session much quicker than
  1007.              TB&.  Some people capitalize the variable names, especially in
  1008.  
  1009. PBTOOL.DOC              Monday, April 20, 1992 10:23 am               Page 20
  1010.  
  1011.  
  1012.              magazines and books: MyArray$, KeyPressed$, TableSize%.  It does
  1013.              look slightly better to me but I can type all capital letters
  1014.              much quicker so it is a speed tradeoff.
  1015.           2. Indent your code for loops, between opening and closing a file,
  1016.              etc.  This makes it easier for you to tell during debugging/
  1017.              maintenance/modifications where actions are occuring and exactly
  1018.              where they STOP occuring.  Make it as easy on yourself as
  1019.              possible -- as your programs grow in complexity you will need
  1020.              all the help you can get!
  1021.  
  1022.              FOR I% =  1 to TABLESIZE%  | OPEN FILENAME1$ FOR BINARY AS #1
  1023.                 CALL ROUTINEA           |    GOSUB READBYTES
  1024.                 CALL GETUSERINPUT       |    GOSUB DISPLAY BYTES
  1025.                 INCR SPACEUSED&         |    CALL MYSPECIALCODE
  1026.                 DECR TIMEALLOTTED&      | CLOSE#1
  1027.              NEXT I%                    |
  1028.  
  1029.              You can see EXACTLY what is occuring with these blocks of code,
  1030.              and note the meaningful names chosen for the subroutines.  If
  1031.              you leave your code alone for any length of time, and especially
  1032.              if you come back to it after writing other complicated programs,
  1033.              you WILL NOT remember all the nooks and crannies without
  1034.              spending some time reading through the code once again.  Make it
  1035.              easy on yourself, practice good coding habits!
  1036.           3. Break your program into modules/blocks of code that are similar.
  1037.              There are no hard and fast rules here but the more experience you
  1038.              have the easier it is to judge when to split things up.  Look
  1039.              over the example programs provided, especially the larger ones.
  1040.              Before you grab your pen to point out some of MY mistakes
  1041.              (jeez, maybe there is one or two), remember that logical design
  1042.              is more of an individual art than a science.  If your program is
  1043.              blowing away when writing a new database record, wouldn't it make
  1044.              sense to check out your WRITENEWRECORD module before searching
  1045.              through several thousand lines of code?  Also be sure to give your
  1046.              modules/subroutines good names which are long enough to mean
  1047.              something to YOU during a 3 a.m. debug session.
  1048.           4. Anytime you are dealing with numbers remember this: If you don't
  1049.              need something after the decimal place (ie 3.5, 4.00321), use
  1050.              integers.  The computer can calculate those numbers much faster
  1051.              than floating  point (such as X!, X#, and X##).  See NUMBERS.INC
  1052.              for a listing of numeric data types available.  There is no
  1053.              reason not to use integer variables for most loops, and
  1054.              subscripts for arrays/tables.  Your programs will be smaller and
  1055.              run anything from slightly faster to "Wow, what is that program
  1056.              written in?!".
  1057.           5. Study good programs which you know work correctly.  Once I get
  1058.              a program working correctly, anytime I need something similar I
  1059.              try to use that same code or at least take a long look at it
  1060.              first.  Several magazines list BASIC source code as do many of
  1061.  
  1062. PBTOOL.DOC              Monday, April 20, 1992 10:23 am               Page 21
  1063.  
  1064.  
  1065.              the better books on the shelves.  Don't reinvent the wheel!
  1066.              Make sure your best code works and use it whenever you can.
  1067.              Save yourself as much coding time as possible and get your
  1068.              programs built and running quicker.
  1069.           6. Learn to trap bugs quickly.  Good debugging techniques are
  1070.              important because all programmers make bugs (besides myself,
  1071.              I've worked with several very talented individuals and they all
  1072.              produced bugs at some point).  PowerBasic has a very good
  1073.              debugger and you should go through the debugging tutorial to get
  1074.              a good start on it.  Writing good code to start with (and
  1075.              spending lots of time thinking about it first) will do much to
  1076.              stem the landslide of bugs that can develop.  I wrote GETKEY.BAS
  1077.              about as quickly as I could type it in, mainly because I worked
  1078.              out the logic in my head during the 30 minute commute home from
  1079.              work.  But PLEASE don't have a wreck trying to do that.
  1080.           7. Borrow good ideas from other languages.  I also program in C and
  1081.              Assembler occasionally because both have some advantages over
  1082.              BASIC.  Both do little to shield the programmer from his/her
  1083.              own dumb mistakes, and Assembler bugs often lock up my machine.
  1084.              String operations are so much easier in BASIC that I find it
  1085.              somewhat painful to deal with tables/arrays in those other two.
  1086.              But don't forget my rule of computer language bigotry!
  1087.  
  1088.                     NOTES FOR TURBOBASIC PROGRAMMERS
  1089.              TurboBasic is a pretty good compiler and I moved up from plain
  1090.              vanilla PC BASIC to it and never went back once I got used to the
  1091.              lack of line numbers.  Its debugging is very weak compared to
  1092.              PowerBasic and QuickBasic above version 3.  It seemed to get in
  1093.              MY way less than QB did so I finally parked QB4 on the shelf.
  1094.              See NUMBERS.INC for a reference on which numeric variables are
  1095.              available with which compiler.  I often use X&& when X& has enough
  1096.              precision (I guess this is a bad habit - you be the judge).  Most
  1097.              of the PBTOOL code is perfectly digestible for both TurboBasic
  1098.              and PowerBasic.  See the summary at the beginning of the File
  1099.              Listing, those few with a "P" beside them are for PowerBasic only.
  1100.              Also you should look over KEYWORDS.TXT for the new stuff added to
  1101.              PowerBasic that will give TB fits during compiles.  Bob Zale wrote
  1102.              both of these (a hum-dinger of a job too!) and if you do much
  1103.              programming at all it is very much worth the bucks to upgrade to
  1104.              PowerBasic.  I've stuck with less than state-of-the-art several
  1105.              times for economic reasons and if you can't upgrade, well, most of
  1106.              PBTOOLs will run using TurboBasic.  I have documented the obvious
  1107.              stuff where I mainly used the advanced features of PowerBasic --
  1108.              and advanced features are very hard NOT TO USE if they are right
  1109.              in front of you.  There are even a few things that came out in
  1110.              PowerBasic v2.10a I just had to use even though it meant
  1111.              alienating both Turbo AND many PowerBasic programmers.  If the
  1112.              equivalent code were easy, I would not be so tempted to use the
  1113.              new features.  Questions/Comments/Gripes, remember my address if
  1114.  
  1115. PBTOOL.DOC              Monday, April 20, 1992 10:23 am               Page 22
  1116.  
  1117.  
  1118.              you're registered.  I'll try to respond to unregistered folks ONLY
  1119.              if you enclose a self-addressed stamped envelope (and as soon as I
  1120.              get the time).
  1121.  
  1122.                     NOTES FOR QUICKBASIC PROGRAMMERS
  1123.              Much of the plain code from PBTOOLs can be put through QuickBasic
  1124.              from Microsoft.  I put my QuickBasic v4.0 on the shelf after
  1125.              comparing it for several months and don't look back.  There are
  1126.              tons of good books and several code libraries available for QB
  1127.              fans however.  Anything by Ethan Winer is worth two or more good
  1128.              looks.  Be sure to refer to your manual often if you want to
  1129.              plunge ahead and use PBTOOL code.  I don't use functions as much
  1130.              as I ought to, but remember that you must specifically declare
  1131.              them in QB before usage.  This was an Achilles heel to me and
  1132.              seemed to get in my way too often.  Using small Assembler routines
  1133.              seemed like a pain too.  However, if you program in another
  1134.              MicroSoft language, linking code from different compilers isn't
  1135.              hard at all.  Unless you are a professional QB coder (and even for
  1136.              intermediate Turbo & PowerBasic programmers), check out BASIC
  1137.              Techniques and Utilities by Ethan Winer (Ziff-Davis Press, 1991).
  1138.              The writing style is very understandable and he covers a lot of
  1139.              territory and there is lots of source code throughout.
  1140.  
  1141.                         RELEASE/VERSION HISTORY
  1142.  
  1143.              1.02  -  Released April 1992
  1144.                       Added    - CLEAR.BAS   several screen clearing routines
  1145.                       Added    - DBASE.TXT   format of DBF files/sample code
  1146.                       Added    - MSGLINE.BAS scrolling billboard-type msg
  1147.                       Added    - READGIF.EXE read info from Gif picture files
  1148.                       Added    - PRINTDBF.BAS print file info on DBF files
  1149.                       Added    - READDBF.BAS read info about DBASE DBF files
  1150.                       Added    - TACHBAR.BAS display tach-style progress bar
  1151.                       Added    - TOUCHIT.BAS set time/date stamp to current
  1152.                       Modified - PBLIB.BAS   more useful routines
  1153.                       Modified - REDNECK.EXE (quick escape for your "boss")
  1154.  
  1155.              1.01  -  Released December 1991
  1156.                       Added    - PBTOGGLE.BAS
  1157.                       Added    - UPPER.BAS
  1158.                       Added    - LOWER.BAS
  1159.                       Added    - MENUBAR.BAS
  1160.                       Added    - MENUBAR2.BAS
  1161.                       Added    - CALENDAR.EXE
  1162.                       Modified - CONVERT.BAS/CONVERT2.BAS (MUCH FASTER)
  1163.                       Modified - COLORS.BAS (BUG FIX & TEXT/NAMES DISPLAYED)
  1164.                       Modified - GRAPHDEM.EXE (FIXED DUMB BUG - WOULDN'T RUN)
  1165.                       Modified - PBATTRIB.EXE (EASIER TO USE)
  1166.  
  1167.  
  1168. PBTOOL.DOC              Monday, April 20, 1992 10:23 am               Page 23
  1169.  
  1170.  
  1171.              1.00  -  Released October 1991
  1172.                       (Rewrote some code during beta testing to
  1173.                       compile with both TurboBasic and PowerBasic).
  1174.  
  1175.              Look for more routines and several enhancements in release 1.03 -
  1176.              quality shareware distributors should have it by mid-summer of
  1177.              1992.  I DO listen to user requests, write if you would like
  1178.              something I do not now offer.  I am currently researching GIF
  1179.              and other graphics file formats and other areas of interest.
  1180.              We'll see what it all leads to.
  1181.  
  1182.  
  1183.                             SHAREWARE I USE
  1184.         Although I cannot personally guarantee you will love them,  I have
  1185.         found both Qedit (programmers' editor) and TELIX (full featured
  1186.         telecommunications program) to be indispensible.  I use both on
  1187.         a daily basis (for several years) and eagerly registered them.
  1188.         If you are into graphics, I think Graphics Workshop wonderful for
  1189.         converting graphics file formats, cropping, shrinking, expanding,
  1190.         and most anything else you might need to do with pictures.  If
  1191.         you need a paint program, I use Desktop Paint 256 to paint, draw,
  1192.         or alter GIF/TIFF/PCX/LBM files (it requires SVGA and a mouse).
  1193.         These are available from any of the larger shareware distributors
  1194.         and many fine BBS across the land.  Remember to support the
  1195.         shareware concept by registering those products you use and trust.
  1196.  
  1197.  
  1198.                                ADDRESSES
  1199.  
  1200.         A. Kellett                          PBTOOLs
  1201.         Attn: Shareware                        shareware code library for
  1202.         Route One Box 430B                     TurboBasic & PowerBasic.
  1203.         Summerville, GA  30747-9801            May be adapted to QuickBasic
  1204.  
  1205.         Borland International               TurboBasic (no longer upgraded),
  1206.         1800 Green Hills Road               TurboDebugger (includes Turbo
  1207.         P.O. Box  660001                       Assembler v2.51, Turbo
  1208.         Scotts Valley, CA  95067-0001          Debugger, Turbo Profiler)
  1209.  
  1210.         PKWare, Inc.                        PKLite v1.12, compresses .EXE
  1211.         7545 N. Port Washington Rd.            files to smaller, self-running
  1212.         Glendale, WI  53217                    files.  Also make PKZIP/PKUNZIP
  1213.                                                which is the standard compress/
  1214.                                                uncompress utilities by which
  1215.                                                ALL others are compared!
  1216.  
  1217.         Semware                             Qedit v2.1, a super multi-file,
  1218.         4343 Shallowford Rd.                   multi-window editor.  Easily
  1219.         Suite C-3                              configurable, fast, small,
  1220.         Marietta, GA  30062-5003               very inexpensive!
  1221.  
  1222. PBTOOL.DOC              Monday, April 20, 1992 10:23 am               Page 24
  1223.  
  1224.  
  1225.         Spectra Publishing                  PowerBasic v2.10, super Basic
  1226.         1030D East Duane Avenue                compiler, allows strings as
  1227.         Sunnyvale, CA  94086                   big as available memory,
  1228.                                                fast, many options, relatively
  1229.                                                inexpensive, network support!
  1230.  
  1231.                                 PERSONAL
  1232.  
  1233.         The author, Andy Kellett, has been using and programming personal
  1234.         computers since 1983 when his wife brought one home to "keep him
  1235.         busy".  He has graduated from a Vocational-Technical Institute and
  1236.         a two-year college, majoring in Data Processing.  He has worked
  1237.         with several firms on systems ranging from very small multi-user
  1238.         computers to large fault-tolerant systems serving hundreds of
  1239.         users.  He enjoys programming in Assembler, C, dBASE, COBOL, and
  1240.         especially BASIC.  He has taught programming classes at a local
  1241.         vocational school for over three years, both full and part-time.
  1242.         He is currently employed by a local hospital as the PC Coordinator.
  1243.         In his spare time he enjoys playing with his three children, calling
  1244.         his wife "Honey", attending Bible classes, wearing overalls, and
  1245.         living the enviable, truck-driving life of a redneck.
  1246.  
  1247.                         ***  T H E    E N D  ***
  1248.  
  1249.  
  1250.          ----------------end-of-author's-documentation---------------
  1251.  
  1252.                          Software Library Information:
  1253.  
  1254.                     This disk copy provided as a service of
  1255.  
  1256.                            Public (software) Library
  1257.  
  1258.          We are not the authors of this program, nor are we associated
  1259.          with the author in any way other than as a distributor of the
  1260.          program in accordance with the author's terms of distribution.
  1261.  
  1262.          Please direct shareware payments and specific questions about
  1263.          this program to the author of the program, whose name appears
  1264.          elsewhere in  this documentation. If you have trouble getting
  1265.          in touch with the author,  we will do whatever we can to help
  1266.          you with your questions. All programs have been tested and do
  1267.          run.  To report problems,  please use the form that is in the
  1268.          file PROBLEM.DOC on many of our disks or in other written for-
  1269.          mat with screen printouts, if possible.  PsL cannot debug pro-
  1270.          programs over the telephone, though we can answer questions.
  1271.  
  1272.          Disks in the PsL are updated  monthly,  so if you did not get
  1273.          this disk directly from the PsL, you should be aware that the
  1274.          files in this set may no longer be the current versions. Also,
  1275.          if you got this disk from another vendor and are having prob-
  1276.          lems,  be aware that  some files may have become corrupted or
  1277.          lost by that vendor. Get a current, working disk from PsL.
  1278.  
  1279.          For a copy of the latest monthly software library newsletter
  1280.          and a list of the 3,000+ disks in the library, call or write
  1281.  
  1282.                            Public (software) Library
  1283.                                P.O.Box 35705 - F
  1284.                             Houston, TX 77235-5705
  1285.  
  1286.                                  Orders only:
  1287.                                 1-800-2424-PSL
  1288.                               MC/Visa/AmEx/Discover
  1289.  
  1290.                           Outside of U.S. or in Texas
  1291.                           or for general information,
  1292.                               Call 1-713-524-6394
  1293.  
  1294.  
  1295.  
  1296.